<ion-view view-title="订单详情" id="order-detail" hide-nav-bar="true">
  <ion-header-bar align-title="center" class="bar-calm">
    <div class="buttons">
      <button class="button head-button button-clear center-btn" ng-click="goBack()">
        <img src="img/order-commit/backIcon.png">
      </button>
    </div>
    <h1 class="title">显示订单状态</h1>
    <div class="buttons">
      <button class="button head-button button-clear center-btn" ng-click="goPrinter()">
        打印
      </button>
    </div>
  </ion-header-bar>
  <ion-content>
    <div class="header-container">
      <span ng-class="{true:'isypk',false:'notypk'}[$storage.odOrderDetail.isupk=='1']">订单号:&nbsp;{{$storage.odOrderDetail.TradeNo}}</span>
      <!--<span class="right">{{data.orderStatus}}</span>-->
    </div>
    <div class="rcv-info-container">
      <div class="nm-container">
        <span class="name-icon"></span><span class="name">{{$storage.odOrderDetail.receiver}}</span>
        <span class="mobile-icon"></span><span class="mobile">{{$storage.odOrderDetail.mobile}}</span>
      </div>
      <p>{{$storage.odOrderDetail.address}}</p>
    </div>
    <div class="body-container" >
      <div class="item-container">

        <img ng-src="{{$storage.odOrderDetail.productimg}}" alt="" ng-if="$storage.odOrderDetail.productimg !=''"/>
        <img ng-src="" alt="" ng-if="$storage.odOrderDetail.productimg ==''"/>
      </div>
      <div class="content-container">
        <div class="line" style="margin-top: 10px;">
          <span style="overflow: hidden;">{{$storage.odOrderDetail.producttitle}}</span><span style="float:right ;">x&nbsp;{{$storage.odOrderDetail.productcount}}</span>
        </div>
        <div class="line" style="font-size: 14px;white-space: nowrap;margin-top:60px;">
          <span style="color: #ff0000;margin-right: 3px;"><span style="margin-right: 3px;">单价</span>¥{{$storage.odOrderDetail.productprice}}</span><span style="margin-left:6px;color:#999;">库存&nbsp;{{$storage.oDOrderInfo.stock}}</span>
          <span style="float:right ;color: #ff0000;">运费&nbsp;¥{{$storage.odOrderDetail.sendmoney}}</span>
        </div>
      </div>
    </div>
    <div class="sendType">
      <span>支付方式</span>
      <span style="float: right;color: #c2c2c2;">{{$storage.odOrderDetail.paytype}}</span>
    </div>
    <div class="sendType">
      <span>配送方式</span>
      <span style="float: right;color: #c2c2c2;">{{$storage.odOrderDetail.sendtype}}</span>
    </div>
    <div class="wuliu" ng-if="$storage.odOrderDetail.sendcode != ''">
      <div class="head">
        <span class="left">订单状态</span>
        <span class="right" ng-if="$storage.wuliuDataState == 0">在途</span>
        <span class="right" ng-if="$storage.wuliuDataState == 1">揽件</span>
        <span class="right" ng-if="$storage.wuliuDataState == 2">疑难</span>
        <span class="right" ng-if="$storage.wuliuDataState == 3">签收</span>
        <span class="right" ng-if="$storage.wuliuDataState == 4">退签</span>
        <span class="right" ng-if="$storage.wuliuDataState == 5">派件</span>
        <span class="right" ng-if="$storage.wuliuDataState == 6">退回</span>
      </div>
      <div class="Detail" ng-repeat=" item in $storage.wuliuData">
        <span class="left">{{item.time}}</span>
        <span class="right">{{item.context}}</span>
      </div>
    </div>
    <div class="sendType">
      <span>总金额</span>
      <span style="float: right;color: #ff0000;">¥{{$storage.odOrderDetail.TradeMoney}}</span>
    </div>
    <div class="bottom-blank"></div>
  </ion-content>
  <div class="footer-button">
    <div class="right-btn-ctn" ng-if="onlinePay">
      <button ng-class="{true:'del-button-max',false:'del-button'}[$storage.odOrderDetail.isupk=='0']" class="button-clear" ng-click="send($storage.odOrderDetail.id)">立即发货</button>
      <button class="button-clear pay-button" ng-if="$storage.odOrderDetail.isupk=='1'"
              ng-click="goIntelligent($storage.odOrderDetail.id)">智能代发</button>
    </div>
    <div class="right-btn-ctn" ng-if="bankPay">
      <button ng-class="{true:'del-button-max',false:'del-button'}[$storage.odOrderDetail.isupk=='0']" class="button-clear" ng-click="send($storage.odOrderDetail.id)">立即发货</button>
      <button class="button-clear pay-button" ng-if="$storage.odOrderDetail.isupk=='1'"
              ng-click="goIntelligent($storage.odOrderDetail.id)">智能代发</button>
    </div>
    <div class="right-btn-ctn" ng-if="offlinePay">
      <button ng-class="{true:'del-button-max',false:'del-button'}[$storage.odOrderDetail.isupk=='0']" class="button-clear" ng-click="send($storage.odOrderDetail.id)">立即发货</button>
      <button class="button-clear pay-button" ng-if="$storage.odOrderDetail.isupk=='1'"
              ng-click="goIntelligent($storage.odOrderDetail.id)">智能代发</button>
    </div>
  </div>
</ion-view>
